home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
STOP.SCR
< prev
next >
Wrap
Text File
|
1991-12-30
|
2KB
|
67 lines
.pg wi full clr cy
COMMAND NAME»gray«: »%t« SetStopLabel »ye«
/STOP [{label}]
/cw
»%t«SetStopLabel»#« defines a label to which »%t«DO»#« will jump when the
user »ye«aborts a script»#« by pressing »bo«<esc>»#«. This allows you to
capture the abort action and route the user back to a »ye«label»#«,
for example, for a menu. Enter "»ma«/STOP»#«" without the optional
»cy«{label}»#« to »re«clear»#« the »gr«stop label»#« and return to normal operation.
If you have executed several scripts from other scripts and press the
»bo«<esc>»#« key, »%t«DO»wh« will stop at the first script with a »ma«Stop Label»wh« set.
»#«
This »%t«SetStopLabel»#« command will help us define a menu structure to
follow. Press »bo«<enter>»#« to execute the command.
|/STOP MENU
:MENU
.clr
This menu has the label »ye«:MENU»#« above it. Press either »bo«<1>»#«
or »bo«<2>»#« to see the effect of the »%t«/STOP»#« command. Otherwise
press »bo«<0>»#« to exit this portion of the tutorial.
»ye«1»gray«. »wh«Selection 1
»ye«2»gray«. »wh«Selection 2
»re«0»gray«. »wh«Exit»«
/GOTOC " »gr«Enter selection»gray«:»#«" 120
:1
:2
.clr
This is the selection. Pressing »bo«<esc>»#« would normally terminate
the script. But, since »%t«SetStopLabel»#« has been executed, it will
return the user to the »ye«:MENU»#« label. Try it . . .
.pg
You did not press »bo«<esc>»#« so this »%t«/GOTO»#« statement below will return
you to the menu as normal.
|/GOTO MENU
:0
/CANCEL ONE
.clr
menu completed
The »%t«/STOP»#« command below will remove the stop label so that
»%t«DO»#« will stop script operation as normal from this point on.
We have also entered a "»gr«/CANCEL »+gr«ONE»#«" command so that just this script
will be terminated and you will be returned to the »ye«TUTORIAL»#« script.
Press »bo«<esc>»#« at the next page prompt after pressing »bo«<enter>»#« to
execute the »%t«/STOP»#« command.
|/STOP
/PAGE
You did not press »bo«<esc>»#« at the »%t«/PAGE»#« command so »%t«DO»#« continued
script operation as normal.
:END
/ENDEXEC CLEAR